package com.bi.autotest.pages.page_open;

import com.auto.base.PageAppium;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;

public class PayProcessOpenPage extends PageAppium {

    public static String PAYSUCCESS_TEXT_XP = "//android.widget.TextView[@text='支付成功']";//微信支付,支付成功的xpath
    public static String PAY_COMPLETE_XP = "//android.widget.Button[@text='完成']";//微信支付,成功页面，完成按钮

    public PayProcessOpenPage(AndroidDriver androidDriver) {
        super(androidDriver);
    }

    /**
     * 微信是否成功
     */
    public boolean isExistWeiXinPaySuccessText() {

        return isXpathExist(PAYSUCCESS_TEXT_XP, 3);
    }

    /**
     * 微信支付完成页面   完成按钮
     */
    public AndroidElement getWeiXinPayCompleteButton() {
        return waitAutoByXp(PAY_COMPLETE_XP,5);
    }


}
